
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>安装git, 建立Octopress博客 - 超群的博客</title>
  <meta name="author" content="wang chaoqun">

  
  <meta name="description" content="github git octopress ruby blog 博客 中文分类">
  <meta name="keywords" content="github git octopress ruby blog 博客 中文分类">

  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  
  <link rel="canonical" href="http://www.wangchaoqun.com/blog/2013/01/07/an-zhuang-git-create-octopress-blog">
  <link href="/favicon.png" rel="icon">
  <!--<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">-->
  <link href="http://bcs.duapp.com/colalife2000/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
  <link href="/atom.xml" rel="alternate" title="超群的博客" type="application/atom+xml">
  <!--<script src="/javascripts/modernizr-2.0.js"></script>-->
  <script src="http://bcs.duapp.com/colalife2000/modernizr-2.0.js"></script>
  <!--<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>-->
  <script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
  <script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/libs/jquery.min.js"%3E%3C/script%3E'))</script>
  <!--<script src="/javascripts/octopress.js" type="text/javascript"></script>-->
  <script src="http://bcs.duapp.com/colalife2000/octopress.js" type="text/javascript"></script>
  <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript">
var ref=location.href;
var wangchaoqun_com="wangchaoqun.com";
var wangchaoqun_cn="wangchaoqun.cn";
var colalife_com="colalife.com";

if(ref.indexOf(colalife_com)!=-1){
  ref=ref.replace(colalife_com, wangchaoqun_com);
  window.location.replace(ref);
} else if(ref.indexOf(wangchaoqun_cn)!=-1){
  ref=ref.replace(wangchaoqun_cn, wangchaoqun_com);
  window.location.replace(ref);
}

function addBlankTargetForLinks () {
  $('a[href^="http"]').each(function(){
      $(this).attr('target', '_blank');
  });
}
$(document).bind('DOMNodeInserted', function(event) {
  addBlankTargetForLinks();
});
</script>

  

</head>

<body   >
  <header role="banner" style="height:92px;background:url(http://bcs.duapp.com/colalife2000/h11.jpg)"><hgroup style="height:100px" onmouseover="this.style.cursor='pointer'" onclick="document.location='/';"></hgroup>

</header>
  <nav role="navigation"><ul class="subscription" data-subscription="rss">
  <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
  
</ul>
  
<form action="http://google.com/search" method="get">
  <fieldset role="search">
    <input type="hidden" name="q" value="site:www.wangchaoqun.com" />
    <input class="search" type="text" name="q" results="0" placeholder="Search"/>
  </fieldset>
</form>
  
<ul class="main-navigation" style="font-weight: bold;">
  <li><a href="/">首页</a></li> 
  <li><a href="/blog/archives">文章列表</a></li> 
  <li><a href="/blog/categories/dai-ma/">代码</a></li>
  <li><a href="/blog/categories/du-shu/">读书</a></li> 
  <li><a href="/blog/categories/zhi-ye/">职业</a></li>
  <li><a href="/blog/categories/sheng-huo/">生活</a></li>
  <li><a href="/blog/categories/qi-ta/">其他</a></li>
  <li><a href="/tags/">标签</a></li>
</ul>

</nav>
  <div id="main">
    <div id="content">
      <div>
<article class="hentry" role="article">
  
  <header>
    
      <h1 class="entry-title">安装git, 建立Octopress博客</h1>
    
    
      <p class="meta">
        








  


<time datetime="2013-01-07T14:34:24+08:00" pubdate data-updated="true">Jan 7<span>th</span>, 2013</time>
        
      </p>
    
  </header>


<div class="entry-content"><p>本文参考了若干网络日志（谢过~）, 配置个人博客后整理而成</p>

<h2>安装git  </h2>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>yum -y install git
</span><span class='line'>git --version</span></code></pre></td></tr></table></div></figure>


<p></p>

<!--more-->


<p>在本机使用git创建SSH Key</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>ssh-keygen -C "username" -t rsa  
</span><span class='line'>ssh -v git@github.com  </span></code></pre></td></tr></table></div></figure>


<p>
//if denied, use <code>ssh-add ~/.ssh/id_rsa</code> to fix this.<br/>
备注: useremail为你注册github用户时的邮箱地址 这时，在系统目录下就会生成一个.ssh文件夹，里面为对应的SSH Key，其中id_rsa.pub是Gighub需要的SSH公钥文件。 将id_ras.pub文件里内容拷贝到Github的Account Settings里的key中。 这样你就可以直接使用Git和Github了.</p>

<h2>安装ruby  </h2>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.gz  
</span><span class='line'>tar -zxvf ruby-2.1.0.tar.gz
</span><span class='line'>cd ruby-2.1.0
</span><span class='line'>./configure --prefix=/usr/local/ruby
</span><span class='line'>make
</span><span class='line'>make test
</span><span class='line'>make install</span></code></pre></td></tr></table></div></figure>


<h2>安装OctoPress  </h2>

<p>通过Git从Github上克隆一份Octopress</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>git clone git://github.com/imathis/octopress.git octopress
</span><span class='line'>cd octopress  
</span><span class='line'>gem install bundler  
</span><span class='line'>bundle install  </span></code></pre></td></tr></table></div></figure>


<p>安装Octopress默认的Theme</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>rake install  </span></code></pre></td></tr></table></div></figure>


<p>
//if error: rake aborted!<br/>
//You have already activated rake 10.1.0, but your Gemfile requires rake 0.9.2.2.
delete your Gemfile.lock and edit the version of rake specified in your Gemfile to 10.1. Job done</p>

<h2>通过_config.yml来配置博客  </h2>

<h2>创建一个博客</h2>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>rake new_post["Hello World"]</span></code></pre></td></tr></table></div></figure>


<h2>创建一个博客页面</h2>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>rake new_page["blog"]</span></code></pre></td></tr></table></div></figure>


<p>预览效果：</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>rake generate  
</span><span class='line'>rake preview  </span></code></pre></td></tr></table></div></figure>


<p></p>

<p>然后在浏览器中打开<a href="http://localhost:4000">http://localhost:4000</a></p>

<h2>发布Octopress到Github</h2>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>cd octopress  
</span><span class='line'>rake setup_github_pages  
</span><span class='line'>Repository url: git@github.com:username/username.github.com.git  </span></code></pre></td></tr></table></div></figure>


<p>将博客发布到Github上，输入下面命令：</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>rake deploy  </span></code></pre></td></tr></table></div></figure>


<p>这样，生成的内容将会自动发布到master分支，并且可以使用 <a href="http://username.github.com">http://username.github.com</a> 访问内容。</p>

<p>将source提交：</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>git add .  
</span><span class='line'>git commit -m "blog init"  
</span><span class='line'>git push origin source  </span></code></pre></td></tr></table></div></figure>


<p>删除之前的添加信息 (配置文件在 ~/octopress/.git/config)</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>git remote rm origin  
</span><span class='line'>git remote add origin git@github.com:username/username.github.com.git  </span></code></pre></td></tr></table></div></figure>


<h2>添加多说评论  </h2>

<p>在_config.yml尾部添加如下行：</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># Duoshuo Comments  
</span><span class='line'>duoshuo_show_comment_count: true  </span></code></pre></td></tr></table></div></figure>


<p>在source/_layouts/post.html尾部添加如下代码：</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>  </span></code></pre></td></tr></table></div></figure>


<p></p>

<p>创建source/_includes/post/duoshuo.html文件，将从多说获得的代码放入其中。</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>&lt;!-- Duoshuo Comment BEGIN --&gt;
</span><span class='line'>    &lt;div class="ds-thread"&gt;&lt;/div&gt;
</span><span class='line'>&lt;script type="text/javascript"&gt;
</span><span class='line'>var duoshuoQuery = {short_name:"username"};
</span><span class='line'>  (function() {
</span><span class='line'>      var ds = document.createElement('script');
</span><span class='line'>      ds.type = 'text/javascript';ds.async = true;
</span><span class='line'>      ds.src = 'http://static.duoshuo.com/embed.js';
</span><span class='line'>      ds.charset = 'UTF-8';
</span><span class='line'>      (document.getElementsByTagName('head')[0] 
</span><span class='line'>      || document.getElementsByTagName('body')[0]).appendChild(ds);
</span><span class='line'>  })();
</span><span class='line'>  &lt;/script&gt;
</span><span class='line'>&lt;!-- Duoshuo Comment END --&gt;</span></code></pre></td></tr></table></div></figure>


<h2>将AddThis更换为JiaThis</h2>

<p>打开source/_includes/post/sharing.html，注释掉<code>&lt;div class="share"&gt;...&lt;/div&gt;</code>中的AddThis相关语句,然后在<code>&lt;/div&gt;</code>前加入从JiaThis获得的代码。</p>

<h2>Octopress写作</h2>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>cd octopress  
</span><span class='line'>rake new_post["new blog"]  </span></code></pre></td></tr></table></div></figure>


<p></p>

<h2>another pc</h2>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>git clone -b source git@github.com:username/username.github.com.git octopress  
</span><span class='line'>cd octopress  
</span><span class='line'>git clone git@github.com:username/username.github.com.git _deploy  </span></code></pre></td></tr></table></div></figure>


<h2>增加category_list插件</h2>

<p>保存以下代码到plugins/category_list_tag.rb：</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>module Jekyll
</span><span class='line'>  class CategoryListTag &lt; Liquid::Tag
</span><span class='line'>    def render(context)
</span><span class='line'>      html = ""
</span><span class='line'>      categories = context.registers[:site].categories.keys
</span><span class='line'>      categories.sort.each do |category|
</span><span class='line'>        posts_in_category = context.registers[:site].categories[category].size
</span><span class='line'>        category_dir = context.registers[:site].config['category_dir']
</span><span class='line'>        category_url = File.join(category_dir, category.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase)
</span><span class='line'>        html &lt;&lt; "&lt;li class='category'&gt;&lt;a href='/#{category_url}/'&gt;#{category} (#{posts_in_category})&lt;/a&gt;&lt;/li&gt;\n"
</span><span class='line'>      end
</span><span class='line'>      html
</span><span class='line'>    end
</span><span class='line'>  end
</span><span class='line'>end
</span><span class='line'>
</span><span class='line'>Liquid::Template.register_tag('category_list', Jekyll::CategoryListTag)</span></code></pre></td></tr></table></div></figure>


<p>将category加入到侧边导航栏，需要增加一个aside
复制以下代码到source/_includes/asides/category_list.html。</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>&lt;section&gt;
</span><span class='line'>  &lt;h1&gt;文章分类&lt;/h1&gt;
</span><span class='line'>  &lt;ul id="categories"&gt;
</span><span class='line'>    <li class='category'><a href='/blog/categories/hibernate/'>hibernate (1)</a></li>
<li class='category'><a href='/blog/categories/java/'>java (6)</a></li>
<li class='category'><a href='/blog/categories/linux/'>linux (1)</a></li>
<li class='category'><a href='/blog/categories/mongodb/'>mongodb (1)</a></li>
<li class='category'><a href='/blog/categories/tomcat/'>tomcat (1)</a></li>
<li class='category'><a href='/blog/categories/web/'>web (2)</a></li>
<li class='category'><a href='/blog/categories/dai-ma/'>代码 (3)</a></li>
<li class='category'><a href='/blog/categories/qi-ta/'>其他 (1)</a></li>
<li class='category'><a href='/blog/categories/sheng-huo/'>生活 (7)</a></li>
<li class='category'><a href='/blog/categories/suan-fa/'>算法 (1)</a></li>
<li class='category'><a href='/blog/categories/zhi-ye/'>职业 (2)</a></li>
<li class='category'><a href='/blog/categories/she-ji-mo-shi/'>设计模式 (1)</a></li>
<li class='category'><a href='/blog/categories/du-shu/'>读书 (3)</a></li>

</span><span class='line'>  &lt;/ul&gt;
</span><span class='line'>&lt;/section&gt;</span></code></pre></td></tr></table></div></figure>


<p>配置侧边栏需要修改_config.yml文件，修改其default_asides项：
default_asides: [&hellip;, asides/category_list.html, &hellip;]</p>

<h2>中文分类支持</h2>

<p>侧边栏添加了文章分类后，英文分类没有问题，点击打开是分类下的文章列表；但中文分类，如云计算、设计模式之类就不行了，网上有各种解决办法，复杂了点；而且我发现新建日志的文件名如果是中文则会转成拼音，文章分类也是，你可以看下public/blog/categories下的文件名；所以如果能把边栏的链接地址改成拼音就行了，rakefile里有<code>rake new_post</code>代码；查看分析发现和<code>plugins/category_list_tag.rb</code>的处理类似，<br/>
<code>category.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase</code>是转换为单词‘-’分隔并且小写，rakefile里是<code> mkdir_p  
"#{source_dir}/#{posts_dir}"  
filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"</code><br/>
  <strong>注意:</strong>title多了<code>.to_url</code>，原来如此，将<code>category_list_tag.rb</code>里改成<br/>
  <code>category.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase.to_url</code>，
然后rake generate  rake preview<br/>
done！</p>
</div>


  <footer style="height:200px">
    <p class="meta">
      
  

<span class="byline author vcard">Posted by <span class="fn">wang chaoqun</span></span>

      








  


<time datetime="2013-01-07T14:34:24+08:00" pubdate data-updated="true">Jan 7<span>th</span>, 2013</time>
      

<span class="categories">
  
    <a class='category' href='/blog/categories/qi-ta/'>其他</a>
  
</span>


      
<DIV style="font-size:12px;BORDER-BOTTOM: #bbbbbb 1px solid; BORDER-LEFT: #bbbbbb 1px solid; BACKGROUND: #f6f6f6; HEIGHT: 120px; BORDER-TOP: #bbbbbb 1px solid; BORDER-RIGHT: #bbbbbb 1px solid" class="myright"> 
<DIV style="MARGIN-TOP: 9px; FLOAT: left; MARGIN-LEFT: 8px; MARGIN-RIGHT: 10px"> 
<!--<IMG title="colalife" src="/images/myicon.jpg" width="80px" height="90px" style="border: #fff 0em solid;">-->
<IMG title="colalife" src="http://bcs.duapp.com/colalife2000/myicon.jpg" width="80px" height="90px" style="border: #fff 0em solid;">
</DIV> 
<DIV style="LINE-HEIGHT: 200%; MARGIN-TOP: 10px; COLOR: #000000"> 
作者： <A href="http://wangchaoqun.com/">王超群</A><BR> 
出处： <A href="http://wangchaoqun.com/">http://wangchaoqun.com/</A> 
<BR>本文基于<a target="_blank" title="Creative Commons Attribution 2.5 China Mainland License" href="http://creativecommons.org/licenses/by/2.5/cn/"> 
署名 2.5 中国大陆</a>许可协议发布，欢迎转载，演绎或用于商业目的，但是必须保留本文的署名 
<a href="http://wangchaoqun.com/">王超群</a>（包含链接）</DIV></DIV> 


    </p>

    <p class="meta">
      
        <a class="basic-alignment left" href="/blog/2013/01/01/excel-dao-chu-gong-ju-lei/" title="Previous Post: excel导出工具类">&laquo; excel导出工具类</a>
      
      
        <a class="basic-alignment right" href="/blog/2013/01/16/cygwin-and-wine-and-ruby-ji-lu/" title="Next Post: Cygwin & Wine & Ruby 记录">Cygwin & Wine & Ruby 记录 &raquo;</a>
      
    </p>
    
      <!-- <div class="sharing">
  
  
  
</div>
 -->
<!-- baidu share Button BEGIN
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_copy" data-cmd="copy" title="分享到复制网址"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_t163" data-cmd="t163" title="分享到网易微博"></a><a href="#" class="bds_tieba" data-cmd="tieba" title="分享到百度贴吧"></a><a href="#" class="bds_hi" data-cmd="hi" title="分享到百度空间"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"32"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=86835285.js?cdnversion='+~(-new Date()/36e5)];</script>
baidu share Button END -->

    
  </footer>
</article>
<!-- duoshuo -->
<section id=”comment”>
<!-- Duoshuo Comment BEGIN -->
<div class="ds-thread"></div>
<script type="text/javascript">
var duoshuoQuery = {short_name:"colalife"};
(function() {
	var ds = document.createElement('script');
	ds.type = 'text/javascript';ds.async = true;
	ds.src = 'http://static.duoshuo.com/embed.js';
	ds.charset = 'UTF-8';
	(document.getElementsByTagName('head')[0] 
	|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- Duoshuo Comment END -->

</section>
</div>

<aside class="sidebar">
  
    <section>
  <h1>关于我</h1>
  <p>
  一个[程序猿，攻城狮]，这么有福气<br><br>
  纸上得来终觉浅，绝知此事要躬行<br><br>
  成长，需要积累； 记录，在此博客<br><br>
  </p>
</section>
<section>  
  <h1>标签</h1>  
  <ul class="tag-cloud">  
    <a style="font-size: 90%" href="/tags/browser/">browser</a>
<a style="font-size: 90%" href="/tags/excel/">excel</a>
<a style="font-size: 90%" href="/tags/hibernate/">hibernate</a>
<a style="font-size: 90%" href="/tags/htmlparser/">htmlparser</a>
<a style="font-size: 90%" href="/tags/httpclient/">httpclient</a>
<a style="font-size: 90%" href="/tags/java/">java</a>
<a style="font-size: 90%" href="/tags/jsoup/">jsoup</a>
<a style="font-size: 133%" href="/tags/octopress/">octopress</a>
<a style="font-size: 133%" href="/tags/ruby/">ruby</a>
<a style="font-size: 90%" href="/tags/sessionfactory/">sessionfactory</a>
<a style="font-size: 90%" href="/tags/spring-test/">spring-test</a>
<a style="font-size: 90%" href="/tags/svn/">svn</a>
<a style="font-size: 90%" href="/tags/shu-ju-ku/">数据库</a>
<a style="font-size: 90%" href="/tags/shi-jian-guan-li/">时间管理</a>
<a style="font-size: 90%" href="/tags/zui-hou-qi-xian/">最后期限</a>
<a style="font-size: 90%" href="/tags/suan-fa/">算法</a>
<a style="font-size: 90%" href="/tags/guan-li-gong-zuo/">管理工作</a>
<a style="font-size: 90%" href="/tags/she-ji-mo-shi/">设计模式</a>
<a style="font-size: 210%" href="/tags/sui-bi/">随笔</a>
<a style="font-size: 90%" href="/tags/xiang-mu-guan-li/">项目管理</a>

  </ul>  
</section>
<section>
  <h1>最新文章</h1>
  <ul id="recent_posts">
    
      <li class="post">
        <a href="/blog/2013/12/03/zhuan-code-kata-bian-ma-tao-lu/">[转]Code Kata：编码套路</a>
      </li>
    
      <li class="post">
        <a href="/blog/2013/11/17/mongodb-replsetji-qun-he-shardfen-pian/">MongoDB replSet集群和shard分片</a>
      </li>
    
      <li class="post">
        <a href="/blog/2013/07/25/zhuan-tomcat-sheng-chan-fu-wu-qi-xing-neng-you-hua/">[转]Tomcat 生产服务器性能优化</a>
      </li>
    
      <li class="post">
        <a href="/blog/2013/01/16/cygwin-and-wine-and-ruby-ji-lu/">Cygwin & Wine & Ruby 记录</a>
      </li>
    
      <li class="post">
        <a href="/blog/2013/01/07/an-zhuang-git-create-octopress-blog/">安装git, 建立Octopress博客</a>
      </li>
    
      <li class="post">
        <a href="/blog/2013/01/01/excel-dao-chu-gong-ju-lei/">Excel导出工具类</a>
      </li>
    
      <li class="post">
        <a href="/blog/2012/12/18/htmlparserhe-httpclientjie-xi-ye-mian-bing-xia-zai/">Htmlparser和httpclient解析页面并下载</a>
      </li>
    
      <li class="post">
        <a href="/blog/2012/11/02/zhuan-shen-ru-li-jie-liu-lan-qi-jian-rong-xing-mo-shi/">[转]深入理解浏览器兼容性模式</a>
      </li>
    
      <li class="post">
        <a href="/blog/2012/09/28/ce-shi-hibernatedong-tai-tian-jia-wei-pei-zhi-de-shi-ti-lei/">测试Hibernate动态添加实体类</a>
      </li>
    
      <li class="post">
        <a href="/blog/2011/04/14/guan-yu-gong-si-ji-zhu-guan-li-gong-zuo-de-ji-dian-si-kao/">关于公司技术管理工作的几点思考</a>
      </li>
    
  </ul>
</section>
<section> 
  <h1>文章分类</h1> 
  <ul id="categories"> 
    <li class='category'><a href='/blog/categories/hibernate/'>hibernate (1)</a></li>
<li class='category'><a href='/blog/categories/java/'>java (6)</a></li>
<li class='category'><a href='/blog/categories/linux/'>linux (1)</a></li>
<li class='category'><a href='/blog/categories/mongodb/'>mongodb (1)</a></li>
<li class='category'><a href='/blog/categories/tomcat/'>tomcat (1)</a></li>
<li class='category'><a href='/blog/categories/web/'>web (2)</a></li>
<li class='category'><a href='/blog/categories/dai-ma/'>代码 (3)</a></li>
<li class='category'><a href='/blog/categories/qi-ta/'>其他 (1)</a></li>
<li class='category'><a href='/blog/categories/sheng-huo/'>生活 (7)</a></li>
<li class='category'><a href='/blog/categories/suan-fa/'>算法 (1)</a></li>
<li class='category'><a href='/blog/categories/zhi-ye/'>职业 (2)</a></li>
<li class='category'><a href='/blog/categories/she-ji-mo-shi/'>设计模式 (1)</a></li>
<li class='category'><a href='/blog/categories/du-shu/'>读书 (3)</a></li>
 
  </ul> 
</section>

  
</aside>


    </div>
  </div>
  <footer role="contentinfo" style="margin-bottom: 40px;"><!-- baidu share BEGIN -->
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"6","bdPos":"left","bdTop":"110"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=86835285.js?cdnversion='+~(-new Date()/36e5)];</script>
<!-- baidu share END -->
<p>
  Copyright &copy; 2014 - wang chaoqun -
  <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>

</footer>
  











  <script type="text/javascript" src="/javascripts/libs/totop.js"></script>
</body>
</html>
